package com.access.model;

/**
 * Created by hrd on 2016/7/13.
 */
public class Environment {
    private String ip = new String();
    private String latitude = new String();
    private String longitude = new String();
    private boolean mobile;
    private String time = new String();

    public Environment() {
    }

    public String envToString() {
        String mobile = this.mobile?"wired":"wireless";
        String envStr = mobile;
        if(this.ip.length() <= 0) {
            envStr = mobile + "," + this.ip;
        }

        if(!this.latitude.equals("")) {
            envStr = envStr + "," + this.latitude;
        }

        if(!this.longitude.equals("")) {
            envStr = envStr + "," + this.longitude;
        }

        if(!this.time.equals("")) {
            envStr = envStr + "," + this.time;
        }

        return envStr;
    }

    public String getIp() {
        return this.ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public String getLatitude() {
        return this.latitude;
    }

    public void setLatitude(String latitude) {
        this.latitude = latitude;
    }

    public String getLongitude() {
        return this.longitude;
    }

    public void setLongitude(String longitude) {
        this.longitude = longitude;
    }

    public boolean isMobile() {
        return this.mobile;
    }

    public void setMobile(boolean mobile) {
        this.mobile = mobile;
    }

    public String getTime() {
        return this.time;
    }

    public void setTime(String time) {
        this.time = time;
    }
}
